package com.h3c.nem.service;

import com.h3c.nem.dto.TbOfferWorkerDTO;
import com.h3c.nem.entity.SdNoticeRecord;
import com.h3c.nem.entity.TbOfferWorker;

import java.util.List;

/**
 * Copyright (C), 2020-2020, h3c
 * FileName: ISdNoticeRecordService
 *
 * @Author: l22886
 * @Date: 2022-01-19
 * Description: sd_notice_record service
 * Version: 1.0
 */
public interface ISdNoticeRecordService {

    /**
     * 创建offer修改审批邮件
     * @param flowId 修改记录id
     * @param deptNameChain 部门name
     * @param emailCode 模板code
     * @param status 哪一级审批
     * @return
     */
    SdNoticeRecord createOfferModifyRecord(String flowId, String deptNameChain, String emailCode, Integer status);

    /**
     * @param targetId 转办人
     * @return
     */
    SdNoticeRecord createOfferModifyRecord(String flowId, String deptNameChain, String emailCode, Integer status, String targetId, TbOfferWorkerDTO offerWorkerDTO);

    /**
     * 创建预备员工资料审核邮件
     * @param flowId
     * @param emailCode
     * @param approvalType
     * @param copyEmail
     * @return
     */
    List<SdNoticeRecord> createOfferWorkerApproval(TbOfferWorker offerWorker, String approvalNote, Integer approvalType, String sendMailFlag);

    /**
     * sap同步预备员工取消入职状态
     * @param offerWorker
     */
    void sapOfferWorkerCancellation(TbOfferWorker offerWorker);

    /**
     * 创建邮件
     * @param flowId 流程id 非流程传 -1
     * @param workerId 收件人工号
     * @param workerName 收件人名称
     * @param email 目标邮箱
     * @param title 邮件标题
     * @param content 邮件内容
     * @param copyEmail 抄送
     * @return
     */
    SdNoticeRecord createEmailNoticeRecord(String flowId, String workerId, String workerName, String email,
                                      String title, String content, String copyEmail);

    SdNoticeRecord createEmailNoticeRecord(String workerId, String workerName, String email,
                                      String title, String content);

    /**
     * 创建企微信息
     * @param workerId 目标工号
     * @param workerName 目标名称
     * @param title 标题
     * @param content 内容
     * @return
     */
    SdNoticeRecord createQwNoticeRecord(String workerId, String workerName, String title, String content);

    /**
     * 创建短信
     * @param workerId 收件人工号 （可不填）
     * @param workerName 收件人姓名 （可不填）
     * @param phoneNo 手机号
     * @param title 短信
     * @param content 短信内容
     * @return
     */
    SdNoticeRecord createSmsNoticeRecord(String workerId, String workerName, String phoneNo, String title, String content);

    SdNoticeRecord createMailRecord(String applyUserId, String targetId, String targetName, String targetEmail, String title, String content);
}
